home *** CD-ROM | disk | FTP | other *** search
/ Amiga Tools 3 / Amiga Tools 3.iso / grafik / raytracing / rayshade-4.0.6.3 / fixes / fix024 / libray / libcommon / vector.h.diff < prev   
Encoding:
Text File  |  1994-08-09  |  912 b   |  34 lines

  1. *** vector.h    Mon Oct 11 15:00:58 1993
  2. --- vector.h.frac    Mon Oct 11 14:47:18 1993
  3. ***************
  4. *** 22,30 ****
  5. --- 22,33 ----
  6.    * Revision 4.0  91/07/17  14:33:11  kolb
  7.    * Initial version.
  8.    * 
  9. +  * Added VecNorm macro  93/01/21   [PhB]
  10. +  * 
  11.    */
  12.   #ifndef VECTOR_H
  13.   #define VECTOR_H
  14. + #include <math.h>
  15.   /*
  16.    * Constants used in projecting onto planes
  17.    */
  18. ***************
  19. *** 81,89 ****
  20. --- 84,96 ----
  21.   #define VecAddScaled(v1,s,v2,r)    (r)->x = (v1).x + (s)*(v2).x, \
  22.                    (r)->y = (v1).y + (s)*(v2).y, \
  23.                    (r)->z = (v1).z + (s)*(v2).z
  24. + #define VecNorm(a)              (sqrt(  (a).x*(a).x + \
  25. +                                         (a).y*(a).y +  \
  26. +                                         (a).z*(a).z   ))
  27.   
  28.   extern void    VecCross(), VecCoordSys(), MakeBump();
  29.   extern Float    VecNormCross(), VecNormalize();
  30. + extern Float    VecDist();
  31.   extern int    Refract();
  32.   
  33.   #endif /* VECTOR_H */
  34.